< previous page page_414 next page >

Page 414
months, you would have a single dataset (company sales figures) with 12 points (one for each month). If you want to create a graph that compares the actual monthly sales figures with the budgeted figures for the last 12 months, you would have two sets of data (actual and budget figures), each with 12 points (one for each month).
You can use the NumSets and NumPoints properties to inform the graph control how the data is to be organized. Create a graph like the one just described. In design mode, use the Property box to set the NumPoints property to 12 and the NumSets property to 1. You have just told the graph control that it should prepare for one set of data containing 12 individual points.
Adding Data in Design Mode
Now add 12 data items at design time so that you can see how the graph looks. Locate the GraphData property in the Property box. It should be set to 0. Now type 1 and press the Enter key. You have just added one of the expected 12 data points for the set. Continue to add data by entering 2, 3, and so on until you have entered values up to 12.
Save the form as FRMGRAPHDESIGN.FRM, and save the project as GRAPHDESIGN.VBP. When you run the project, your graph should look something like the one shown in Figure 11.4.
0414-01.jpg
Figure 11.4.
Adding data in design mode.

 
< previous page page_414 next page >

If you like this book, buy it!